home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_08_12 / 8n12076a < prev    next >
Text File  |  1990-08-28  |  357b  |  16 lines

  1. /* receiver.c - Receiver task for asynchronous communication */
  2.  
  3. #define SYNC 0
  4.  
  5. static handler Sync(msg_t *msg_ptr) { /* for synchronization only */
  6. }
  7.  
  8. task Receiver(void) {
  9.     task_setHandler(1, Sync); /* this task has one handler called Sync */
  10.  
  11.     loop {
  12.         /* wait on Sync */
  13.         task_enableWait(NO_TIMEOUT, 1, SYNC);
  14.     }
  15. }
  16.